<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>文本框</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" >
    <meta name="generator" content="www.leipi.org" />
    <link rel="stylesheet" href="bootstrap/css/bootstrap.css">
    <!--[if lte IE 6]>
    <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap-ie6.css">
    <![endif]-->
    <!--[if lte IE 7]>
    <link rel="stylesheet" type="text/css" href="bootstrap/css/ie.css">
    <![endif]-->
    <link rel="stylesheet" href="formDesign.css">
    <script type="text/javascript" src="../dialogs/internal.js"></script>
</head>
<body>
<div class="content">
    <table class="table table-bordered table-striped table-hover">
     <tr>
        <th><span>控件名称</span><span class="label label-important">*</span></th>
        <th><span>字体大小</span> </th>
    </tr>
    <tr>
        <td><input id="orgname" type="text" placeholder="必填项"/></td>
        <td><input id="orgfontsize" type="text"  value="" class="input-small span1" placeholder="auto"/> px</td>
    </tr>
    <tr>
        <th colspan="2"><span>输入框样式</span> </th>
    </tr>
    <tr>
        <td colspan="2">
            宽 <input id="orgwidth" type="text" value="300" class="input-small span1" placeholder="auto"/> px
            &nbsp;&nbsp;
            高 <input id="orgheight" type="text" value="80" class="input-small span1" placeholder="auto"/> px
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <label for="orgvalue">默认值</label>
            <textarea class="input-block-level" rows="3" id="orgvalue" placeholder="多行文本框默认值..."></textarea>
        </td>
    </tr>
    </table>
</div>
<script type="text/javascript">

dialog.oncancel = function () {};
dialog.onok = function (){
    if($G('orgname').value==''){
        alert('请输入控件名称');
        return false;
    }
    var gValue=$G('orgvalue').value.replace(/\"/g,"&quot;"),
        gTitle=$G('orgname').value.replace(/\"/g,"&quot;"),
        gFontSize=$G('orgfontsize').value,
        gWidth=$G('orgwidth').value,
        gHeight=$G('orgheight').value;


        var html = '<textarea ';
        html += ' title = "' + gTitle + '"';
        html += ' name = "'+gTitle+'"';
        html += ' value = "' + gValue + '"';

        html += ' style = "';
        if( gFontSize != '' ) {
            html += 'font-size:' + gFontSize + 'px;';
        }
        if( gWidth != '' ) {
            html += 'width:' + gWidth + 'px;';
        }
        if( gHeight != '' ) {
            html += 'height:' + gHeight + 'px;';
        }
        html += '">';
        html += gValue + '</textarea>';
        editor.execCommand('insertHtml',html);


};
</script>
</body>
</html>
